﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace TetrisSpielwiese
{
    /// <summary>
    /// Interaktionslogik für MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

            Viewbox viewbox = new Viewbox();
            Canvas canvas = new Canvas();

            Content = viewbox;
            viewbox.Child = canvas;

            canvas.Width = 750;
            canvas.Height = 300;

            Polygon shortI = new Polygon();
            shortI.Points = BlockShapes2D.BlockShortI;
            shortI.Fill = Brushes.DarkCyan;
            shortI.RenderTransform = new TranslateTransform(2 * GameUnits2D.Width, 0);

            Polygon longI = new Polygon();
            longI.Points = BlockShapes2D.BlockLongI;
            longI.Fill = Brushes.DarkCyan;
            longI.RenderTransform = new TranslateTransform(4 * GameUnits2D.Width, 0);

            Polygon angle = new Polygon();
            angle.Points = BlockShapes2D.BlockAngle;
            angle.Fill = Brushes.Magenta;
            angle.RenderTransform = new TranslateTransform(6 * GameUnits2D.Width, 0);

            Polygon l = new Polygon();
            l.Points = BlockShapes2D.BlockL;
            l.Fill = Brushes.LimeGreen;
            l.RenderTransform = new TranslateTransform(9 * GameUnits2D.Width, 0);

            Polygon rect = new Polygon();
            rect.Points = BlockShapes2D.BlockRectangle;
            rect.Fill = Brushes.CadetBlue;


            canvas.Children.Add(shortI);
            canvas.Children.Add(rect);
            canvas.Children.Add(longI);
            canvas.Children.Add(angle);
            canvas.Children.Add(l);
        }
    }
}
